<!DOCTYPE html>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="jquery-3.4.1.min.js"></script>
    <script src="echarts.js"></script>
    <title>Document</title>
</head>
<body>
    <div id="echarts" style="width: 100%; height: 480px;"></div>

    <script>
        function getData(datas) {
            var errorData = new Array;
            try {
                tmpstr = JSON.stringify(datas);
                substr = tmpstr.substring(2,tmpstr.length-2);
                errorData = substr.split(',');
            }catch(exception) {
                alert(exception);
            }

            var dom = document.getElementById("echarts");
            var myChart = echarts.init(dom);
            option = {
                tooltip:{
                    trigger:'axis',
                    axisPointer:{
                        type:'shadow'
                    }
                },
                grid: {
                    left: '3%',
                    right: '4%',
                    bottom: '1%',
                    containLabel: true
                },
                xAxis: {
                    type: 'category',
                    axisLabel:{
                        rotate:'45'
                    },
                    data: ['0:00:01-2:00:00', '2:00:01-4:00:00', '4:00:01-6:00:00', '6:00:01-8:00:00', '8:00:01-10:00:00', '10:00:01-12:00:00', '12:00:01-14:00:00', '14:00:01-16:00:00', '16:00:01-18:00:00', '18:00:01-20:00:00', '20:00:01-22:00:00', '22:00:01-24:00:00']
                },
                yAxis: {
                    type: 'value'
                },
                series: [{
                    data: errorData,
                    type: 'bar'
                }]
            };
            myChart.setOption(option, true);
        }
    </script>
</body>
</html>